/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.uba.fi.RSACryptoFiuba.view;

import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class ModePanel extends JPanel {
	
	private JLabel title;
	private JLabel description;
	private JButton learningButton;
    private JButton evaluationButton;
    
    public ModePanel(ActionListener learningActionListener, ActionListener evaluationActionListener) {
        initComponents();
        this.learningButton.addActionListener(learningActionListener);
        this.evaluationButton.addActionListener(evaluationActionListener);
        
    }
    private void initComponents() {

    	learningButton = new JButton();
        evaluationButton = new JButton();
        title = new JLabel();
        description = new JLabel();

        learningButton.setText("Aprendizaje");

        evaluationButton.setText("Autoevaluación");

        title.setFont(new Font("Ubuntu", 1, 36)); // NOI18N
        title.setText("Algoritmo RSA");

        description.setText("<html><p>Elegí el modo en el que querés usar esta aplicación:</p><br>En el modo Aprendizaje vas a ver un paso a paso del Algoritmo.<br><br>En el modo Evaluación vas a poder demostrar tus conocimientos.<br><br><p align=center>¿Empezamos?</p></html>");

        GroupLayout layout = new GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(223, 223, 223)
                        .addComponent(title))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(165, 165, 165)
                        .addGroup(layout.createParallelGroup(Alignment.LEADING)
                            .addComponent(description, GroupLayout.PREFERRED_SIZE, 363, GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(learningButton, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)
                                .addGap(63, 63, 63)
                                .addComponent(evaluationButton, GroupLayout.PREFERRED_SIZE, 150, GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(158, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(Alignment.LEADING)
            .addGroup(Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(title)
                .addGap(31, 31, 31)
                .addComponent(description)
                .addGap(34, 34, 34)
                .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                    .addComponent(learningButton, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE)
                    .addComponent(evaluationButton, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE))
                .addGap(52, 52, 52))
        );
    }
}
